package com.service;

import java.util.List;
import java.util.Map;

import com.model.Question;
import com.model.Tag;
import com.util.Page;

public interface QuestionService {

	public Question addQuestion(int uid, int quid, String question, int qscore, int isPublic, int isAnonymous);

	public int deleteQuestion(int id);

	public Question answerQuestion(int id, String answer, int answerUserId);

	public int addQuestionTag(int qid, String tag);

	public String agreeQuestion(int qid, int uid);

	public String disagreeQuestion(int qid, int uid);

	public String favorQuestion(int qid, int uid);

	public String collectQuestion(int qid, int uid);

	public void addComment(int qid, int uid, String comment);

	public void agreeComment(int id);

	public void disagreeComment(int id);

	public Question findById(int id);

	public Page getAnswerdQuestionByPage(int id, int page, int pageSize);

	public Page getUnAnswerdQuestionByPage(int id, int page, int i);

	public boolean ignoreQuestion(int questionId, int id);

	public Page getIgnoredQuestion(int userId, int page, int pageSize);

	public boolean unignoreQuestion(int questionId, int userId);

	public Page getAnswerdQuestionByPage(int userId, int page, int pageSize, boolean isPublic);

	public Page findSendQuestionByPage_All(int userId, int page, int pageSize);
	
	public Page findSendQuestionByPage_AnswerdAll(int userId, int page, int pageSize);
	
	public Page findSendQuestionByPage_AnswerdPublic(int userId, int page, int pageSize);

	public Page findSendQuestionByPage_UnAsnwerd(int userId, int page, int pageSize);

	public Page findSendQuestionByPage_Ignored(int userId, int page, int pageSize);

	public List findCommentsByPage(int questionId, int page, int pageSize);

	public List<Tag> findQuestionTags(int questionId);

	public Map findByIdWithUser(int questionId);

	public void doCommentAction(int targetId, String action);

	public List findNewQuestionTopN(int topN);

	public List findHotQuestionTopN(int topN);
}
